{% extends "admin/base_site.html" %}
{% load adminmedia admin_list i18n %}
{% block stylesheet %}{% admin_media_prefix %}css/changelists.css{% endblock %}
{% block bodyclass %}change-list{% endblock %}
{% block coltype %}flex{% endblock %}

{% block extrastyle %}{% include "__search_admin_stylesheet.html" %}{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href="/admin/">{% trans "Home" %}</a> &rsaquo;
    <a href="/admin/{{opts.app_label}}/">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
    <a href="/admin/{{opts.app_label}}/{{opts_model.get_meta.model_name}}/">{{opts_model.get_meta.verbose_name|capfirst}}({{opts_model.get_meta.app_label}})</a> &rsaquo;
    <a href="./">{{object}}</a> &rsaquo;
</div>
{% endblock %}

{% block content %}
<div id="content-main">

<h1>{{opts_model.get_meta.model_name}}</h1>
<div class="module">
{% block result-list %}

<table class="table-search" width="100%">
<caption>{{object}}</caption>
{% for field in object.get_fields %}
	{% if field.abstract %}
	{% else %}
<tr>
    <td scope="row" align="right"><nobr>{% blocktrans with field.verbose_name|capfirst as name %}{{name}}{% endblocktrans %}:</nobr></td>
    <td>
        {{field.to_model}}
		  {% if field.has_terms %}
        &nbsp;&rsaquo;<a href="#"
            onclick='
var ul = document.getElementById("search-model-object-view-terms-{{field.name}}");
if (ul.style.display == "none")
{
    ul.style.display = "";
} else {
    ul.style.display = "none";
}
return false;
            '
        >{% trans "Show Terms" %}</a>
        <ul
            id="search-model-object-view-terms-{{field.name}}"
            style="
                display: none;
            "
        >
            {% for t in field.get_terms %}
                <li>{{t}}</li>
            {% endfor %}
        </ul>
		  {% endif %}
    </td>
</tr>
	{% endif %}
{% endfor %}
</table>

{% endblock %}
</div>
{% endblock %}
